package com.study.naixue.rpcclient;

import com.study.naixue.rpcclient.service.UserService;
import com.study.naixue.rpcclient.service.UserServiceImpl;
import com.study.naixue.rpccommon.entity.User;

/**
 * @ClassName RpcClient
 * @Description TODO
 * @Author xuqianghui
 * @Date 2020/5/23 11:08
 * @Version 1.0
 */
public class RpcClient {

    public static void main(String[] args) {
        UserService userService = new UserServiceImpl();
        User user = new User();
        user.setAge((short) 26);
        user.setSex((short) 1);

        boolean ret = userService.addUser(user);
        if(ret){
            System.out.println("调用远程服务创建用户成功!!!");
        }else {
            System.out.println("调用远程服务创建用户失败!!!");
        }
    }
}
